import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { AddressItem } from '@/types/address'
export const useAddressStore = defineStore('addressStore', () => {
  const selectAddress = ref<AddressItem>()
  const changeSelectAddress = (val: AddressItem) => {
    selectAddress.value = val
  }
  const clearAddress = () => {
    selectAddress.value = {} as AddressItem
  }
  return {
    selectAddress,
    changeSelectAddress,
    clearAddress,
  }
})
